package com.wuye.repository;

import org.springframework.data.jpa.repository.*;
import java.util.*;
import com.wuye.model.*;

public interface OrderItemRepository extends JpaRepository<OrderItem,String>{
    public OrderItem findByOrderNum(String orderNum);

    @Query(nativeQuery = true,value = "select * from wuye_order_item where order_num = ?1")
    public List<OrderItem> findByOrderSn(String orderSn);
    @Query(nativeQuery = true,value = "select * from wuye_order_item order by orderDate desc")
    public List<OrderItem> findAllByOrderByOrderDate_Desc();
}